﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class HideHandOnGrab : GrabObject {
    Renderer[] renderers;

    protected override void OnGrabbed()
    {
        //renderers = vrtkObj.GetGrabbingObject().transform.parent.GetComponentInChildren<HandAnimationController>().transform.Find("hand").GetComponentsInChildren<Renderer>();
        //foreach (var item in renderers)
        //{
        //    item.enabled = false;
        //}
    }

    protected override void OnUngrabbed()
    {
        if (renderers.Length > 0)
        {
            foreach (var item in renderers)
            {
                item.enabled = true;
            }
        }
        renderers = new Renderer[0];
    }
}
